//
//  UIImage+Resize.m
//  Chat
//
//  Created by huangtao on 16/7/12.
//  Copyright © 2016年 fish. All rights reserved.
//

#import "UIImage+Resize.h"

@implementation UIImage (Resize)

+ (UIImage *)resizableImageNamed:(NSString *)name
{
    UIImage *inImage = [UIImage imageNamed:name];
    UIEdgeInsets edgeInsets = UIEdgeInsetsMake(ceilf(inImage.size.height / 2), ceilf(inImage.size.width / 2), ceilf(inImage.size.height / 2), ceilf(inImage.size.width / 2));
    inImage = [inImage resizableImageWithCapInsets:edgeInsets];
    return inImage;
}
@end
